The VM (virtual machine) technology refers to virtualizing one server into a plurality of virtual machines isolated from each other, or virtualizing a plurality of servers into one virtual machine, so as to improve utilization rate of resources and simplify system management.
VM real-time migration refers to migration of a running virtual machine from one server to another in real time. In-migration and out-migration of the VM may be achieved by using the VDP (Virtual Station Interface, VSI, Discovery and Configuration Protocol) to implement network-based configuration of the VM real-time migration. A general procedure of the existing VDP is as follows:
When a server creates a VM or a VM is migrated to a server, the server sends a pre-associate message to a switch. The switch obtains a VSI type according to the pre-associate message, and obtains, according to the message, parameters from a VSI database to configure the switch. When receiving an associate message sent by the server, the configuration of the switch is enabled.
When a server deletes a VM or a VM is migrated out from a server, the server sends a de-associate message to a switch.
In the prior art, a format of a VDP message is shown in FIG. 1, including a TLV (type length value) data packet header and a TLV information string. As shown in FIG. 1, the TLV data packet header includes the following fields:
TLV type field: identifies the type of the message; the type may include pre-associate message, associate message, and de-associate message; and
TLV information string length: identifies the length of the TLV information string.
As shown in FIG. 2, an existing TLV information string may include the following fields:
Reason, VSI Mgr ID (virtual station interface management ID), VSI Type ID (virtual station interface type ID), VSI Type Version (virtual station interface type version), VSI Instance ID (virtual station interface instance ID), MAC/VLAN Format, and MAC/VLANs (MAC, media access control; VLAN, virtual local area network).
During the implementation of the present invention, the inventor discovers that the prior art has at least the following disadvantages:
In the prior art, when a VM is migrated to or created on a server, the server will send a VDP message to a switch, resulting in that the switch fails to accurately acquire migration of the VM from the VDP message. In this case, the switch fails to timely establish a binding relationship for the migrated VM, thereby affecting timeliness of services.